package com.liuch.mybatis.binding;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;

/**
 * 动态代理工厂
 * 用动态代理工厂加强mapper代理
 */
public class MapperProxyFactory {


    public static <T> T getProxy(Class<T> mapperClass){

        return (T) Proxy.newProxyInstance(mapperClass.getClassLoader(), new Class[]{mapperClass}, new MapperProxy());
    }

}
